package com.wyl.base

import androidx.appcompat.app.AppCompatActivity
import com.wyl.libbase.extend.openActivity


/* 基础组件 */
const val Base = "/base"

const val WebPage = "$Base/WebPage"


/* 服务组件 */
const val Service = "/service"

const val PublishTypePage = "$Service/PublishTypePage"


/* 首页组件 */

const val Home = "/home"

const val VideoHistoryPage = "$Home/VideoHistoryPage"
const val TimetablePage = "$Home/TimetablePage"
const val VideoDetailPage = "$Home/VideoDetailPage"
const val HomePage = "$Home/HomePage"


/* 登录组件 */

const val Login = "/login"
const val LoginPage = "$Login/LoginPage"
const val AgreementPage = "$Login/AgreementPage"

/* 我的组件 */

const val Mine = "/mine"

const val MinePage = "$Mine/MinePage"
const val MessagePage = "$Mine/MessagePage"
const val CollectionPage = "$Mine/CollectionPage"


//fun openVideoDetailPage(videoid: String?, noid: String? = "", new: Boolean = false) =
//    openActivity(VideoDetailPage) {
//        withString("videoid", videoid)
//        withString("noid", noid)
//        withBoolean("new", new)
//    }

fun AppCompatActivity.openWebPage(url: String, title: String) {
    openActivity(WebPage) {
        withString("url", url)
        withString("title", title)
    }
}

